﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using laba2.Context;
using laba2.Entity;
using laba2.Repository.IRepository;

namespace laba2.Repository.DAO
{
   public class StudentDAO:GenericDAO<Student>,IStudentRepository
   {
       public List<Student> GetByName(string name)
       {
           using (var context=new Lab3DBContext())
           {
               return (from student in context.Students
                       where student.Name == name
                       select student).ToList();
           }
       }
   }
}
